package com.sg.dto.biz.framework.common;

import com.sg.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Objects;


/**
 * @desc BaseChangeColDto
 * @使用场景
 */
@Data
public class BaseChangeColDto extends BaseDto implements Serializable {

    /**
     * 变更字段英文名
     */
    @NotNull(message = "变更字段英文名不能为空")
    @ApiModelProperty("变更字段英文名")
    private String objectPropertyCode;

    /**
     * 变更字段内容
     */
    @NotNull(message = "变更字段内容不能为空")
    @ApiModelProperty("变更字段内容")
    private String metaDataColumnContent;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        BaseChangeColDto that = (BaseChangeColDto) o;
        return objectPropertyCode == that.objectPropertyCode && metaDataColumnContent == that.metaDataColumnContent;
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), objectPropertyCode, metaDataColumnContent);
    }


}
   